home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / CIncludes / Lists.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-10-13  |  4.2 KB  |  148 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3. Created: Thursday, September 7, 1989 at 4:48 PM
  4.     Lists.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.     Copyright Apple Computer, Inc.    1985-1989
  9.     All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __LISTS__
  15. #define __LISTS__
  16.  
  17. #ifndef __TYPES__
  18. #include <Types.h>
  19. #endif
  20.  
  21. #ifndef __CONTROLS__
  22. #include <Controls.h>
  23. #endif
  24.  
  25. #ifndef __MEMORY__
  26. #include <Memory.h>
  27. #endif
  28.  
  29. #define lDoVAutoscroll 2
  30. #define lDoHAutoscroll 1
  31. #define lOnlyOne -128
  32. #define lExtendDrag 64
  33. #define lNoDisjoint 32
  34. #define lNoExtend 16
  35. #define lNoRect 8
  36. #define lUseSense 4
  37. #define lNoNilHilite 2
  38. #define lInitMsg 0
  39. #define lDrawMsg 1
  40. #define lHiliteMsg 2
  41. #define lCloseMsg 3
  42.  
  43. typedef Point Cell;
  44.  
  45. typedef char DataArray[32001],*DataPtr,**DataHandle;
  46.  
  47. typedef pascal short (*SearchProcPtr)(Ptr aPtr, Ptr bPtr, short aLen, short bLen);
  48.  
  49.  
  50. struct ListRec {
  51.     Rect rView;
  52.     GrafPtr port;
  53.     Point indent;
  54.     Point cellSize;
  55.     Rect visible;
  56.     ControlHandle vScroll;
  57.     ControlHandle hScroll;
  58.     char selFlags;
  59.     Boolean lActive;
  60.     char lReserved;
  61.     char listFlags;
  62.     long clikTime;
  63.     Point clikLoc;
  64.     Point mouseLoc;
  65.     ProcPtr lClikLoop;
  66.     Cell lastClick;
  67.     long refCon;
  68.     Handle listDefProc;
  69.     Handle userHandle;
  70.     Rect dataBounds;
  71.     DataHandle cells;
  72.     short maxIndex;
  73.     short cellArray[1];
  74. };
  75.  
  76. typedef struct ListRec ListRec;
  77. typedef ListRec *ListPtr, **ListHandle;
  78.  
  79. #ifdef __cplusplus
  80. extern "C" {
  81. #endif
  82. ListHandle lnew(Rect *rView,Rect *dataBounds,Point *cSize,short theProc,
  83.     WindowPtr theWindow,Boolean drawIt,Boolean hasGrow,Boolean scrollHoriz,
  84.     Boolean scrollVert);
  85. pascal ListHandle LNew(const Rect *rView,const Rect *dataBounds,Point cSize,
  86.     short theProc,WindowPtr theWindow,Boolean drawIt,Boolean hasGrow,Boolean scrollHoriz,
  87.     Boolean scrollVert)
  88.     = {0x3F3C,0x0044,0xA9E7};
  89. pascal void LDispose(ListHandle lHandle)
  90.     = {0x3F3C,0x0028,0xA9E7};
  91. pascal short LAddColumn(short count,short colNum,ListHandle lHandle)
  92.     = {0x3F3C,0x0004,0xA9E7};
  93. pascal short LAddRow(short count,short rowNum,ListHandle lHandle)
  94.     = {0x3F3C,0x0008,0xA9E7};
  95. pascal void LDelColumn(short count,short colNum,ListHandle lHandle)
  96.     = {0x3F3C,0x0020,0xA9E7};
  97. pascal void LDelRow(short count,short rowNum,ListHandle lHandle)
  98.     = {0x3F3C,0x0024,0xA9E7};
  99. pascal Boolean LGetSelect(Boolean next,Cell *theCell,ListHandle lHandle)
  100.     = {0x3F3C,0x003C,0xA9E7};
  101. pascal Cell LLastClick(ListHandle lHandle)
  102.     = {0x3F3C,0x0040,0xA9E7};
  103. pascal Boolean LNextCell(Boolean hNext,Boolean vNext,Cell *theCell,ListHandle lHandle)
  104.     = {0x3F3C,0x0048,0xA9E7};
  105. pascal Boolean LSearch(Ptr dataPtr,short dataLen,SearchProcPtr searchProc,
  106.     Cell *theCell,ListHandle lHandle)
  107.     = {0x3F3C,0x0054,0xA9E7};
  108. pascal void LSize(short listWidth,short listHeight,ListHandle lHandle)
  109.     = {0x3F3C,0x0060,0xA9E7};
  110. pascal void LDoDraw(Boolean drawIt,ListHandle lHandle)
  111.     = {0x3F3C,0x002C,0xA9E7};
  112. pascal void LScroll(short dCols,short dRows,ListHandle lHandle)
  113.     = {0x3F3C,0x0050,0xA9E7};
  114. pascal void LAutoScroll(ListHandle lHandle)
  115.     = {0x3F3C,0x0010,0xA9E7};
  116. pascal void LUpdate(RgnHandle theRgn,ListHandle lHandle)
  117.     = {0x3F3C,0x0064,0xA9E7};
  118. pascal void LActivate(Boolean act,ListHandle lHandle)
  119.     = {0x3F3C,0x0000,0xA9E7};
  120. pascal void LCellSize(Point cSize,ListHandle lHandle)
  121.     = {0x3F3C,0x0014,0xA9E7};
  122. pascal Boolean LClick(Point pt,short modifiers,ListHandle lHandle)
  123.     = {0x3F3C,0x0018,0xA9E7};
  124. pascal void LAddToCell(Ptr dataPtr,short dataLen,Cell theCell,ListHandle lHandle)
  125.     = {0x3F3C,0x000C,0xA9E7};
  126. pascal void LClrCell(Cell theCell,ListHandle lHandle)
  127.     = {0x3F3C,0x001C,0xA9E7};
  128. pascal void LGetCell(Ptr dataPtr,short *dataLen,Cell theCell,ListHandle lHandle)
  129.     = {0x3F3C,0x0038,0xA9E7};
  130. pascal void LFind(short *offset,short *len,Cell theCell,ListHandle lHandle)
  131.     = {0x3F3C,0x0034,0xA9E7};
  132. pascal void LRect(Rect *cellRect,Cell theCell,ListHandle lHandle)
  133.     = {0x3F3C,0x004C,0xA9E7};
  134. pascal void LSetCell(Ptr dataPtr,short dataLen,Cell theCell,ListHandle lHandle)
  135.     = {0x3F3C,0x0058,0xA9E7};
  136. pascal void LSetSelect(Boolean setIt,Cell theCell,ListHandle lHandle)
  137.     = {0x3F3C,0x005C,0xA9E7};
  138. pascal void LDraw(Cell theCell,ListHandle lHandle)
  139.     = {0x3F3C,0x0030,0xA9E7};
  140. void ldraw(Cell *theCell,ListHandle lHandle);
  141. Boolean lclick(Point *pt,short modifiers,ListHandle lHandle);
  142. void lcellsize(Point *cSize,ListHandle lHandle);
  143. #ifdef __cplusplus
  144. }
  145. #endif
  146.  
  147. #endif
  148.